﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Threading.Tasks;
using System.Data.SqlClient;
using DAL;

namespace BLL
{
    public class ForReaderAdd
    {
        public int AddReader(string ReaderID,string ReaderName,string Pwd,string Phone,string Address,string IDCard)
        {
            string sql = string.Format(@"insert into Reader(ReaderID,ReaderName,Pwd,Phone,Address,IDCard) 
                           values('{0}','{1}','{2}','{3}','{4}','{5}');", ReaderID, ReaderName, Pwd, Phone, Address, IDCard);
            //执行
            int readerID = Convert.ToInt32(DBHelper.ExecuteScalar(sql));
            return readerID;
        }
    }
}
